home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / base / ltnews.cls < prev    next >
Text File  |  1997-04-24  |  15KB  |  514 lines

  1. % \iffalse meta-comment
  2. %
  3. % Copyright 1993 1994 1995 1996 1997
  4. % The LaTeX3 Project and any individual authors listed elsewhere
  5. % in this file. 
  6. % For further copyright information, and conditions for modification
  7. % and distribution, see the file legal.txt, and any other copyright
  8. % notices in this file.
  9. % This file is part of the LaTeX2e system.
  10. % ----------------------------------------
  11. %   This system is distributed in the hope that it will be useful,
  12. %   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. %   For error reports concerning UNCHANGED versions of this file no
  15. %   more than one year old, see bugs.txt.
  16. %   Please do not request updates from us directly.  Primary
  17. %   distribution is through the CTAN archives.
  18. % IMPORTANT COPYRIGHT NOTICE:
  19. % You are NOT ALLOWED to distribute this file alone.
  20. % You are allowed to distribute this file under the condition that it
  21. % is distributed together with all the files listed in manifest.txt.
  22. % If you receive only some of these files from someone, complain!
  23. % Permission is granted to copy this file to another file with a
  24. % clearly different name and to customize the declarations in that
  25. % copy to serve the needs of your installation, provided that you
  26. % comply with the conditions in the file legal.txt.
  27. % However, NO PERMISSION is granted to produce or to distribute a
  28. % modified version of this file under its original name.
  29. %  
  30. % You are NOT ALLOWED to change this file.
  31. % \fi
  32. % Filename: ltnews.cls
  33. % Author: Alan Jeffrey
  34. % Version: 0.11
  35.  
  36. % This is the LaTeX2e document class for the `LaTeX News' information 
  37. % sheet which comes with every LaTeX release.  It may be useful for 
  38. % newsletters, or as an example of how simple newsletters can be set
  39. % with LaTeX.  The changes log is at the end of the file.
  40.  
  41. % Copyright 1994 1995 1996
  42. % Alan Jeffrey and the LaTeX3 project.  
  43.  
  44. % This is a LaTeX2e document class.
  45.  
  46. \NeedsTeXFormat{LaTeX2e}
  47.  
  48. \ProvidesClass{ltnews}[1994/11/29 Standard LaTeX class]
  49.  
  50. % The configuration file, used for passing options.
  51.  
  52. \InputIfFileExists{ltnews.cfg}{%
  53.    \ClassInfo{ltnews}{Using local configuration file}%
  54. }{%
  55.    \ClassInfo{ltnews}{No local configuration file}%
  56. }
  57.  
  58. % The lw35fonts option uses the fonts:
  59. %
  60. %    Adobe Palatino          (main text)
  61. %    Adobe Helvetica Bold    (headings)
  62. %    Courier                 (program listings)
  63. %    Mathptm math italic     (2e logo)
  64. %    Mathptm symbol font     (AMS logo)
  65. %
  66. % The type1fonts option uses the fonts:
  67. %    Adobe Utopia            (main text)
  68. %    URW Grotesk-T Bold      (headings)
  69. %    Lucida Sans typewriter  (program listings)
  70. %    Mathptm math italic     (2e logo)
  71. %    Mathptm symbol font     (AMS logo)
  72.  
  73. % The Adobe Palatino fonts:
  74.  
  75. \DeclareFontFamily{OT1}{ppl}{}
  76. \DeclareFontShape{OT1}{ppl}{m}{n}{<-> pplr7t}{}
  77. \DeclareFontShape{OT1}{ppl}{m}{sc}{<-> pplrc7t}{}
  78. \DeclareFontShape{OT1}{ppl}{m}{it}{<-> pplri7t}{}
  79.  
  80. \DeclareFontFamily{T1}{ppl}{}
  81. \DeclareFontShape{T1}{ppl}{m}{n}{<-> pplr8t}{}
  82. \DeclareFontShape{T1}{ppl}{m}{sc}{<-> pplrc8t}{}
  83. \DeclareFontShape{T1}{ppl}{m}{it}{<-> pplri8t}{}
  84.  
  85. % The Adobe Helvetica fonts:
  86.  
  87. \DeclareFontFamily{OT1}{phv}{}
  88. \DeclareFontShape{OT1}{phv}{m}{n}{<-> s*[0.86] phvr7t}{}
  89. \DeclareFontShape{OT1}{phv}{b}{n}{<-> phvb7t}{}
  90.  
  91. \DeclareFontFamily{T1}{phv}{}
  92. \DeclareFontShape{T1}{phv}{m}{n}{<-> s*[0.86] phvr8t}{}
  93. \DeclareFontShape{T1}{phv}{b}{n}{<-> phvb8t}{}
  94.  
  95. % The Adobe Courier fonts:
  96.  
  97. \DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
  98. \DeclareFontShape{OT1}{pcr}{m}{n}{<-> s*[0.89] pcrr7t}{}
  99.  
  100. \DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
  101. \DeclareFontShape{T1}{pcr}{m}{n}{<-> s*[0.89] pcrr8t}{}
  102.  
  103. % The Utopia fonts:
  104.  
  105. \DeclareFontFamily{OT1}{put}{}
  106. \DeclareFontShape{OT1}{put}{m}{n}{<-> putr7t}{}
  107. \DeclareFontShape{OT1}{put}{m}{sc}{<-> putrc7t}{}
  108. \DeclareFontShape{OT1}{put}{m}{it}{<-> putri7t}{}
  109.  
  110. % The URW Grotesk fonts:
  111.  
  112. \DeclareFontFamily{OT1}{ugq}{}
  113. \DeclareFontShape{OT1}{ugq}{b}{n}{<-> ugqb7t}{}
  114.  
  115. % The Lucida Sans Typewriter fonts:
  116.  
  117. \DeclareFontFamily{OT1}{hlct}{\hyphenchar\font=-1}
  118. \DeclareFontShape{OT1}{hlct}{m}{n}{<-> hlct7t}{}
  119.  
  120. % The mathptm math italic:
  121.  
  122. \DeclareFontFamily{OML}{ptmcm}{\skewchar\font=127}
  123. \DeclareFontShape{OML}{ptmcm}{m}{it}{<-> zptmcmrm}{}
  124.  
  125. % The mathptm symbol font:
  126.  
  127. \DeclareFontFamily{OMS}{pzccm}{}
  128. \DeclareFontShape{OMS}{pzccm}{m}{n}{<-> zpzccmry}{}
  129.  
  130. % The TeX logo for use with Palatino.
  131.  
  132. \def\pplTeX{T\kern-.15em\lower.4ex\hbox{E}\kern-.1emX\@}
  133.  
  134. % The LaTeX logo for use with Palatino.
  135.  
  136. \DeclareRobustCommand{\pplLaTeX}{L\kern-.3em
  137.         {\setbox0\hbox{T}%
  138.          \vbox to\ht0{\hbox{%
  139.                             \csname S@\f@size\endcsname
  140.                             \fontsize\sf@size\z@
  141.                             \math@fontsfalse\selectfont
  142.                             A}%
  143.                       \vss}%
  144.         }%
  145.         \kern-.07em
  146.         \TeX}
  147.  
  148. % The TeX logo for use with Utopia.
  149.  
  150. \def\putTeX{T\kern-.1667em\lower.4ex\hbox{E}\kern-.075emX\@}
  151.  
  152. % The LaTeX logo for use with Utopia.
  153.  
  154. \DeclareRobustCommand{\putLaTeX}{L\kern-.2em
  155.         {\setbox0\hbox{T}%
  156.          \vbox to\ht0{\hbox{%
  157.                             \csname S@\f@size\endcsname
  158.                             \fontsize\sf@size\z@
  159.                             \math@fontsfalse\selectfont
  160.                             A}%
  161.                       \vss}%
  162.         }%
  163.         \kern-.05em
  164.         \TeX}
  165.  
  166. % The TeX logo for use with Helvetica.
  167.  
  168. \def\phvTeX{T\kern-.1em\lower.4ex\hbox{E}\kern-.05emX\@}
  169.  
  170. % The LaTeX logo for use with Helvetica.
  171.  
  172. \DeclareRobustCommand{\phvLaTeX}{L\kern-.3em
  173.         {\calculate@math@sizes
  174.          \setbox0\hbox{T}%
  175.          \vbox to\ht0{\hbox{%
  176.                             \csname S@\f@size\endcsname
  177.                             \fontsize\sf@size\z@
  178.                             \math@fontsfalse\selectfont
  179.                             A}%
  180.                       \vss}%
  181.         }%
  182.         \kern-.05em
  183.         \TeX}
  184.  
  185. % The TeX logo for use with Grotesk.
  186.  
  187. \def\ugqTeX{T\kern-.1em\lower.4ex\hbox{E}\kern-.05emX\@}
  188.  
  189. % The LaTeX logo for use with Grotesk.
  190.  
  191. \DeclareRobustCommand{\ugqLaTeX}{L\kern-.15em
  192.         {\calculate@math@sizes
  193.          \setbox0\hbox{T}%
  194.          \vbox to\ht0{\hbox{%
  195.                             \csname S@\f@size\endcsname
  196.                             \fontsize\sf@size\z@
  197.                             \math@fontsfalse\selectfont
  198.                             A}%
  199.                       \vss}%
  200.         }%
  201.         \kern-.01em
  202.         \TeX}
  203.  
  204. % The TeX logo for use with CMSS.
  205.  
  206. \def\cmssTeX{T\kern-.2em\lower.4ex\hbox{E}\kern-.05emX\@}
  207.  
  208. % The LaTeX logo for use with CMSS.
  209.  
  210. \DeclareRobustCommand{\cmssLaTeX}{L\kern-.22em
  211.         {\setbox0\hbox{T}%
  212.          \vbox to\ht0{\hbox{%
  213.                             \csname S@\f@size\endcsname
  214.                             \fontsize\sf@size\z@
  215.                             \math@fontsfalse\selectfont
  216.                             A}%
  217.                       \vss}%
  218.         }%
  219.         \kern-.17em
  220.         \TeX}
  221.  
  222. % Switch off some of the article options.
  223.  
  224. \DeclareOption{a4paper}{\OptionNotUsed}
  225. \DeclareOption{a5paper}{\OptionNotUsed}
  226. \DeclareOption{b5paper}{\OptionNotUsed}
  227. \DeclareOption{letterpaper}{\OptionNotUsed}
  228. \DeclareOption{legalpaper}{\OptionNotUsed}
  229. \DeclareOption{executivepaper}{\OptionNotUsed}
  230. \DeclareOption{landscape}{\OptionNotUsed}
  231. \DeclareOption{twoside}{\OptionNotUsed}
  232. \DeclareOption{titlepage}{\OptionNotUsed}
  233. \DeclareOption{onecolumn}{\OptionNotUsed}
  234.  
  235. % The CM fonts
  236.  
  237. \newcommand{\@titlefont}{\normalfont\Huge}
  238. \newcommand{\@indiciafont}{\normalfont\footnotesize}
  239. \newcommand{\@headingfont}{%
  240.    \large\sffamily\slshape
  241.    \let\LaTeX\cmssLaTeX\let\TeX\cmssTeX
  242. }
  243.  
  244. % The LW 35 fonts option
  245.  
  246. \DeclareOption{lw35fonts}{%
  247.    \renewcommand{\rmdefault}{ppl}%
  248.    \renewcommand{\ttdefault}{pcr}%
  249.    \renewcommand{\sfdefault}{phv}%
  250.    \renewcommand{\@titlefont}{%
  251.       \fontsize{50}{60}\fontfamily{phv}\fontseries{b}\selectfont
  252.       \let\LaTeX\phvLaTeX\let\TeX\phvTeX
  253.    }%
  254.    \renewcommand{\@indiciafont}{%
  255.       \fontsize{8}{10}\fontfamily{ppl}\fontshape{it}\selectfont
  256.    }%
  257.    \renewcommand{\@headingfont}{%
  258.       \fontsize{12}{14}\fontfamily{phv}\fontseries{b}\selectfont
  259.       \let\LaTeX\phvLaTeX\let\TeX\phvTeX
  260.    }%
  261.    \DeclareSymbolFont{letters}{OML}{ptmcm}{m}{it}%
  262.    \DeclareSymbolFont{symbols}{OMS}{pzccm}{m}{n}%
  263.    \let\LaTeX\pplLaTeX
  264.    \let\TeX\pplTeX
  265.    \AtEndOfClass{\addtolength\textheight\baselineskip}%
  266.    }
  267.  
  268. % The type 1 fonts option
  269.  
  270. \DeclareOption{type1fonts}{%
  271.    \renewcommand{\rmdefault}{put}%
  272.    \renewcommand{\ttdefault}{hlct}%
  273.    \renewcommand{\sfdefault}{ugq}%
  274.    \renewcommand{\@titlefont}{%
  275.       \fontsize{50}{60}\fontfamily{ugq}\fontseries{b}\selectfont
  276.       \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
  277.    }%
  278.    \renewcommand{\@indiciafont}{%
  279.       \fontsize{8}{10}\fontfamily{put}\fontshape{it}\selectfont
  280.    }%
  281.    \renewcommand{\@headingfont}{%
  282.       \fontsize{12}{14}\fontfamily{ugq}\fontseries{b}\selectfont
  283.       \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
  284.    }%
  285.    \renewcommand{\verbatim@font}{%
  286.       \fontsize{9}{12}\fontfamily{hlct}\selectfont
  287.    }%
  288.    \DeclareSymbolFont{letters}{OML}{ptmcm}{m}{it}%
  289.    \DeclareSymbolFont{symbols}{OMS}{pzccm}{m}{n}%
  290.    \let\LaTeX\putLaTeX
  291.    \let\TeX\putTeX
  292. }
  293.  
  294. % The default action for any option is to pass it to the article
  295. % class.
  296.  
  297. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  298.  
  299. % Execute the options.
  300.  
  301. \ProcessOptions
  302.  
  303. % Load the article class.
  304.  
  305. \LoadClass[twocolumn,oneside]{article}
  306.  
  307. % The page style.
  308.  
  309. \pagestyle{empty}
  310. \setlength{\parindent}{1em}
  311. \setlength{\rightskip}{0pt plus \textwidth}
  312. \setlength{\@rightskip}{\rightskip}
  313. \setlength{\parfillskip}{0pt plus 2\textwidth}
  314. \setlength{\columnsep}{2em}
  315.  
  316. % The text size, which tries to work with both A4 and letter paper
  317. % sizes. 
  318.  
  319. \setlength{\textheight}{230mm}
  320. \setlength{\topmargin}{-10mm}
  321.  
  322. \setlength{\textwidth}{180mm}
  323. \setlength{\oddsidemargin}{-10mm}
  324.  
  325. % \maketitle parameters.
  326.  
  327. \newcommand{\publicationmonth}{\renewcommand{\@month}}
  328. \newcommand{\@month}{\ClassError{ltnews}
  329.    {No \protect\publicationmonth~given}\@eha}
  330.  
  331. \newcommand{\publicationyear}{\renewcommand{\@year}}
  332. \newcommand{\@year}{\ClassError{ltnews}
  333.    {No \protect\publicationyear~given}\@eha}
  334.  
  335. \newcommand{\publicationissue}{\renewcommand{\@issue}}
  336. \newcommand{\@issue}{\ClassError{ltnews}
  337.    {No \protect\publicationissue~given}\@eha}
  338. \newcommand{\issuename}{Issue}
  339.  
  340. \newcommand{\indicia}{\renewcommand{\@indicia}}
  341. \newcommand{\@indicia}{%
  342.    \LaTeXNews, and the \LaTeX{} software,
  343.    are brought to you by the \LaTeX3 Project Team;
  344.    Copyright \@year, all rights reserved.
  345. }
  346.  
  347. \title{\LaTeXNews}
  348.  
  349. % The \maketitle for the LaTeX News.
  350.  
  351. \renewcommand{\maketitle}{%
  352.    \twocolumn[{%
  353.       \parbox[t][7\baselineskip]{\textwidth}{%
  354.          \@titlefont\@title\\[\medskipamount]
  355.          \normalfont\normalsize\issuename~\@issue, \@month~\@year
  356.       }%
  357.    }]%
  358.    \thispagestyle{titlepage}
  359. }
  360.  
  361. \newcommand{\ps@titlepage}{%
  362.    \renewcommand{\@oddhead}{\hfill}%
  363.    \renewcommand{\@evenhead}{\hfill}%
  364.    \renewcommand{\@oddfoot}{\@indiciafont\@indicia\hfill}%
  365.    \renewcommand{\@evenfoot}{\@indiciafont\@indicia\hfill}%
  366. }
  367.  
  368. % Sectioning commands.
  369.  
  370. \renewcommand{\section}{%
  371.    \@startsection
  372.       {section}{1}{\z@}{-1.5ex \@plus -1ex \@minus -.2ex}%
  373.       {1ex \@plus.2ex}{\@headingfont}%
  374. }
  375.  
  376. % No section numbers.
  377.  
  378. \setcounter{secnumdepth}{0}
  379.  
  380. % Set lists tighter, but brought in by 1em (otherwise the first line 
  381. % always looks very wide).
  382.  
  383. \renewcommand{\@listI}{%
  384.    \setlength{\leftmargin}{\leftmargini}%
  385.    \setlength{\topsep}{\medskipamount}%
  386.    \setlength{\itemsep}{0pt}%
  387.    \setlength{\listparindent}{1em}%
  388.    \setlength{\rightskip}{1em}%
  389. }
  390. \let \@listi \@listI
  391.  
  392. \newenvironment{citations}{%
  393.    \list{}{%
  394.       \renewcommand{\makelabel}[1]{\itshape{##1},}%
  395.    }%
  396. }{%
  397.    \endlist
  398. }
  399.  
  400. % Some logos.
  401.  
  402. \newcommand{\NFSS}{NFSS}
  403. \newcommand{\LaTeXNews}{\LaTeX~News}
  404. \newcommand{\AW}{Addison Wesley}
  405. \newcommand{\SLiTeX}{\textsc{Sli}\TeX}
  406. \newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower
  407.          .5ex\hbox{\protect\the\textfont2 M}\kern
  408.          -.125em{\protect\the\textfont2 S}}
  409. \newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}
  410.  
  411. % Hacking to make <...> produce italics in verbatim.  NB: this can be 
  412. % done more cleanly using the verbatim package.  But the ltnews class
  413. % has  to run on any LaTeX installation, even those without the
  414. % verbatim package.  
  415.  
  416. % Here we extend the font-setting command to include making <> active
  417. % (ie adjusting the input encoding).
  418. \renewcommand \verbatim@font {%
  419.   \normalfont \ttfamily
  420.   \catcode`\<=\active
  421.   \catcode`\>=\active
  422. }
  423.   
  424. % Make active <...> produce italics surrounded by angle brackets
  425. % (used in verbatim and \verb);
  426. % << produces a less-than, and >> produces a greater-than.
  427.  
  428. \begingroup
  429.   \catcode`\<=\active
  430.   \catcode`\>=\active
  431.   \gdef<{\@ifnextchar<\@lt\@meta}
  432.   \gdef>{\@ifnextchar>\@gt\@gtr@err}
  433.   \gdef\@meta#1>{{\reset@font\normalsize\itshape#1\/}}
  434.   \gdef\@lt<{\char`\<}
  435.   \gdef\@gt>{\char`\>}
  436. \endgroup
  437. \def\@gtr@err{%
  438.    \ClassError{ltxguide}{%
  439.       Isolated \protect>%
  440.    }{%
  441.       In this document class, \protect<...\protect>
  442.       is used to indicate a parameter.\MessageBreak
  443.       I've just found a \protect> on its own.
  444.       Perhaps you meant to type \protect>\protect>?
  445.    }%
  446. }
  447. \def\verbatim@nolig@list{\do\`\do\,\do\'\do\-}
  448.  
  449. % That's it!
  450.  
  451. \endinput
  452.  
  453. % CHANGELOG
  454. %
  455. % 20 May 1994, v0.01: Created file.
  456. %
  457. % 21 May 1994, v0.02: Made <...> produce italics inside verbatim.
  458. %    Added the indicia, \publicationyear, \publicationmonth and 
  459. %    \publicationissue.  Added the citations environment.  Switched off 
  460. %    some of the article class options.
  461. % 21 May 1994, v0.03: Fixed a bug with ragged right.  Fixed a bug
  462. %    which was causing underfull hbox messages.
  463. % 27 May 1994, v0.04: Added SliTeX logo, and proper AMS LaTeX logo.
  464. %    Added angle brackets to <...>.
  465. %
  466. % 31 May 1994, v0.05: Added downloaded PS fonts options.  Removed
  467. %    angle brackets from <...> since these were the last remaining
  468. %    bitmaps!  Added variants of the LaTeX logo.  Added the ltnews.cfg
  469. %    file.  Added the lw35fonts option.
  470. %
  471. % 27 Jul 1994, v0.06: Corrected a typo `\PassOptionToClass' should
  472. %    have been `\PassOptionsToClass'.  Manas Mandal pointed that one
  473. %    out. 
  474. %
  475. % 29 Nov 1994, v0.07: Made <...> only active in verbatim.
  476. % 09 Dec 1995, v0.08: Upper case for Project Team.
  477. % 20 Dec 1995, v0.09: Tidided up the list stuff.
  478. % 03 Jun 1996, v0.10: Changed fonts for lw35 option, for logical and
  479. %    aesthetic reasons.
  480. %
  481. % 06 Jun 1996, v0.11: Corrected grammar in footer.
  482. %
  483. % 10 June 1996 v0.12: Add extra line in lw35fonts option,
  484. %     so 04 and 05 do not run over the page.
  485. %     Make font scaling messages go to log only.
  486.  
  487. % BUGS
  488. %
  489. % Switching between logos like this is a mess.
  490. %
  491. % The last column should be set flush bottom.
  492.  
  493.